import Vue from 'vue'
import VueResource from 'vue-resource'
import store from '@/views/vuex/workshop'
Vue.use(VueResource)
export default {
  store,

  getshoplist() {
    return new Promise((zhixing) => {
      Vue.http.post('api/workshop').then(
        res => {
          this.store.commit('workshoplist', { data: res.data.data })
          console.log(res.data.data, '1')
          zhixing({ code: 0, data: res })
        },
        err => {
          console.log(err)
          zhixing({ code: 1, data: err })
        }
      )
    })
  }

}

